<template>
  <el-menu
      :router="false"
      class="el-menu-demo"
      mode="horizontal"
      :ellipsis="false"
      @select="handleSelect"
  >
    <div class="flex-grow" />
    <el-menu-item><span><el-icon><QuestionFilled /></el-icon></span></el-menu-item>
    <el-sub-menu index="">
      <template #title> <el-avatar
          src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
      />&nbsp;Zlhranhou </template>
      <el-menu-item index="1"><el-icon><User /></el-icon>个人设置</el-menu-item>
      <el-menu-item index="2"><el-icon><Key /></el-icon>修改密码</el-menu-item>
      <el-menu-item index="3"><el-icon><Close /></el-icon>退出登录</el-menu-item>
    </el-sub-menu>
  </el-menu>
</template>


<script lang="ts">
  export default {
    name:'HeaderBox'
  }
</script>

<script lang="ts" setup>
import { ref } from 'vue'
import{
  QuestionFilled,
  User,
  Key,
  Close,
} from '@element-plus/icons-vue'

const activeIndex = ref('1')
const handleSelect = (key: string, keyPath: string[]) => {
 switch (keyPath[0]){
   case 3:

     break
 }
}
</script>



<style>
.flex-grow {
  flex-grow: 1;
}
</style>
